﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MMDemo
{
    class NewStackData:InterfaceNewData
    {
        public bool NewData()
        {
            switch (GlobalStack.operateType)
            {
                case StackOperateType.Hanoi:
                    InitHanoiDiskNum(); 
                    break;
                case StackOperateType.Queen:
                    InitQueenNum();
                    break;
            }
            return PublicDataClass.IsInit;
        }
        /// <summary>
        /// 汉若塔
        /// </summary>
        private void InitHanoiDiskNum()
        {
            StackHanoiForm nhf = new StackHanoiForm();
            nhf.ShowDialog();
        }
        private void InitQueenNum()
        {
            StackQueenForm nqf = new StackQueenForm();
            nqf.ShowDialog();
        }
        public void ShowForm(SysDemoForm demof, SysArithmeticForm arif, int Width, int Height)
        {
            demof.Top = 0;
            demof.Left = 0;
            demof.Width = Width / 2;
            demof.Height = Height;
            demof.Show();

            arif.Top = 0;
            arif.Left = Width / 2;
            arif.Width = Width / 2;
            arif.Height = Height;
            arif.Show();
        }
    
    }
}
